package com.ruoyi.hualian.service;

import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;

/**
 * 关于 Excel 的接口
 *
 * @author hujian
 */
public interface ExcelService {

    /**
     * 根据Excel表返回想要的实体类集合
     */
    <T> List<T> excelObjectList(Class<T> objectClass, String filePath, String fileName, Boolean consolePrinting);

    /**
     * Excel表对应的List对象集合
     */
    <T> List<T> read(MultipartFile file, Class<T> objectClass) throws Exception;

    /**
     * 根据List集合下载Excel文件
     */
    <T> String wired(List<T> list, Class<T> objectClass, String excelName, HttpServletResponse response) throws Exception;

    /**
     * 绿灯率
     */
    String green(String greenFilePath, String greenFileName, String summaryFilePath, String summaryFileName, HttpServletResponse response) throws Exception;

    /**
     * 货期数据导入数据库
     */
    AjaxResult deliveryTime(String filePath, String fileName, HttpServletResponse response);

    /**
     * 中机昌盛-华刚资料整理
     */
    String zhongJiChangShengHuaGang(HttpServletResponse response) throws Exception;

    /**
     * 法兰 FC 统计数据
     */
    String fcStatistics(String filePath, String fileName, HttpServletResponse response) throws Exception;

    /**
     * ERP价格梯度-个性导入
     */
    String priceGradient(String filePath, String fileName, HttpServletResponse response) throws Exception;
}
